package nc.tb.cube.fmldim;

import nc.tb.cube.model.Plan;
import nc.tb.report.ViewUIModel;

import com.ufsoft.table.Cell;

public class FdNull extends FmlDimBO {

	@Override
	public void generateDescription() throws IllegalFmlDimException {
		// do nothing
	}

	@Override
	public void operate(Plan model, Cell ic, ViewUIModel uiModel)
			throws FmlDimOperateException, IllegalFmlDimException {
		// do nothing
	}

	@Override
	protected IFmlDim combinTo(IFmlDim fd) throws CanNotCombinException {
		if (fd instanceof FdNull)
			return fd;
		try {
			return FmlDimGenerator.createByFmlType(FmlDimConst.FML_DIM_FORMULA_TYPE_NULL);
		}
		catch (IllegalFmlDimException ie) {
			return this;
		}
	}

	@Override
	public String getDefaultText() {
		return "";
	}
	
	@Override
	protected IFdOperator getOperator() throws IllegalFmlDimException {
		return null;
	}

}
